<%--
  Created by IntelliJ IDEA.
  User: 18009118265
  Date: 2020/9/15
  Time: 23:15
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!-- 自适应 -->
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Insert title here</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui/css/layui.css">
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css1/adminLogin.css">
    <script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
</head>
<body>
<div class="wrap">
    <img src="${pageContext.request.contextPath}/static/css1/beiji.jpg" class="imgStyle">
    <div class="loginForm">
        <form class="layui-form" action="/admin/login" method="post"><!--提交给这个controller-->

            <div class="layui-form-item">
                <div class="logoHead">
                    <h2 style="margin-top: 15px">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;后台管理系统</h2>
                </div>
                <div class="usernameWrapDiv">
                    <div class="usernameLabel">
                        <label>用户名</label>
                    </div>
                    <div class="usernameDiv">
                        <i class="layui-icon layui-icon-username adminIcon"></i>
                        <input id="loginUsername" class="layui-input adminInput" type="text" name="name" required
                               lay-verify="required" placeholder="请输入用户名"
                               autocomplete="off"
                               class="layui-input">
                    </div>
                    <div class="usernameWrapDiv">
                        <div class="usernameLabel">
                            <label>密码</label>
                        </div>
                        <div class="passwordDiv">
                            <i class="layui-icon layui-icon-password adminIcon"></i>
                            <input id="loginPassword" class="layui-input adminInput" type="password" name="pass"
                                   required lay-verify="required" placeholder="请输入密码"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="formDemo">立即登录</button>
                        </div>
                    </div>
                </div>
            </div>

        </form>
        <script type="text/javascript">
            //layui.user(加载使用的模块),我们这里只使用了form,还可以加载table,jquery等等
            layui.use('form', function () {
                var form = layui.form;
                //监听form的提交 监听lay-filter
                form.on(submit('formDemo'), function (data) {
                    console.log();
                    //alert(data.field);
                })
            })


        </script>
    </div>
</div>
<script src="https://cdn.jsdelivr.net/npm/live2d-widget@3.0.4/lib/L2Dwidget.min.js"></script>
<script type="text/javascript">
    L2Dwidget.init();
</script>

</body>
</html>
